package com.blockmeta.bbs.overallserviceapplication.umeng;

import android.content.Context;
import com.blankj.utilcode.util.LogUtils;

import com.blockmeta.bbs.baselibrary.utils.ToastUtil;
import com.umeng.socialize.UMAuthListener;
import com.umeng.socialize.bean.SHARE_MEDIA;

/**
 * Created by AirThor
 * Date 2018/1/12.
 */

public abstract class UMLoginListener implements UMAuthListener {
    private Context mContext;

    public UMLoginListener(Context context) {
        mContext = context;
    }

    @Override
    public void onStart(SHARE_MEDIA share_media) {

    }

    @Override
    public void onError(SHARE_MEDIA share_media, int i, Throwable throwable) {
        if (mContext==null) {return;}
        ToastUtil.show(mContext,throwable.getMessage());
    }

    @Override
    public void onCancel(SHARE_MEDIA share_media, int i) {
        if (mContext==null) {return;}
        ToastUtil.show(mContext,"取消登录");
    }
}
